import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("dict_category_item", { schema: "frog_charge" })
export class DictCategoryItem {
  @PrimaryGeneratedColumn({ type: "smallint", name: "id", unsigned: true })
  id: number;

  @Column("tinyint", {
    name: "category_id",
    unsigned: true,
    default: () => "'0'",
  })
  categoryId: number;

  @Column("varchar", { name: "name", length: 10 })
  name: string;

  @Column("varchar", { name: "code", comment: "代号", length: 20 })
  code: string;

  @Column("tinyint", { name: "level", unsigned: true, default: () => "'0'" })
  level: number;

  @Column("smallint", {
    name: "parent_id",
    unsigned: true,
    default: () => "'0'",
  })
  parentId: number;

  @Column("int", {
    name: "update_time",
    comment: "更新",
    unsigned: true,
    default: () => "'0'",
  })
  updateTime: number;

  @Column("int", {
    name: "create_time",
    comment: "创建时间",
    unsigned: true,
    default: () => "'0'",
  })
  createTime: number;
}
